package cn.smbms.dao;

import cn.smbms.pojo.User;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Classname UserMapper
 * @Description TODO
 * @Date 2020-10-10 10:27
 * @Created by 26440
 */
public interface UserMapper extends BaseMapper<User> {
    //@Select("select u.*,r.roleName as userRoleName from smbms_user u,smbms_role r where u.userRole = r.id")
    @Select("select u.*,r.roleName as userRoleName from smbms_user u join smbms_role r on u.userRole = r.id ${ew.customSqlSegment}")
    List<User> selectUserList(@Param(Constants.WRAPPER) Wrapper<User> wrapper);
}
